﻿using DI.Controller;
using DI.Service.Impl;
using DI.Service.Interface;
using Microsoft.Extensions.DependencyInjection;

namespace DI
{
    internal class Program
    {
        static void Main(string[] args)
        {
            ServiceCollection service = new ServiceCollection();
            service.AddSingleton<TestController>();
            service.AddSingleton<IConfig,DbconfigImpl>();
            //service.AddSingleton<ILog,LogImpl>();
            service.AddSingleton<ISave, SaveImpl>();
            service.AddLogImpl();
            var sp =service.BuildServiceProvider();
            
            sp.GetService<TestController>().Test();
                //c.Test();
 
        }

        
    }
}
